package com.whfc.ms.api.sys.service.impl;

import com.whfc.fuum.dto.SysRoleDTO;
import com.whfc.fuum.dto.SysRoleDetailDTO;
import com.whfc.fuum.dto.SysRuleDTO;
import com.whfc.fuum.dto.SysUserDTO;
import com.whfc.fuum.param.SysRoleAdd;
import com.whfc.fuum.param.SysRoleEdit;
import com.whfc.fuum.param.SysRoleRuleEdit;
import com.whfc.fuum.service.SysRoleService;
import com.whfc.ms.api.sys.service.MsSysRoleService;
import org.apache.dubbo.config.annotation.DubboReference;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * @author qzexing
 * @version 1.0
 * @date 2020-12-10 19:34
 */
@Service
public class MsSysRoleServiceImpl implements MsSysRoleService {

    @DubboReference(interfaceClass = SysRoleService.class, version = "1.0.0")
    private SysRoleService sysRoleService;

    @Override
    public List<SysRoleDTO> list(Integer userId, Integer deptId, String keyword) {
        return sysRoleService.list(userId, deptId, keyword);
    }

    @Override
    public void add(SysRoleAdd request) {
        sysRoleService.add(request);
    }

    @Override
    public void del(Integer id) {
        sysRoleService.del(id);
    }

    @Override
    public void edit(SysRoleEdit request) {
        sysRoleService.edit(request);
    }

    @Override
    public SysRoleDetailDTO getRoleDetailById(Integer id, Integer platform) {
        return sysRoleService.getRoleDetailById(id, platform);
    }

    @Override
    public List<SysUserDTO> getRoleUserList(Integer roleId) {
        return sysRoleService.getRoleUserList(roleId);
    }

    @Override
    public List<SysRuleDTO> getRoleRuleList(Integer roleId, Integer platform) {
        return sysRoleService.getRoleRuleList(roleId, platform);
    }

    @Override
    public void editRoleRule(SysRoleRuleEdit roleRuleEdit) {
        sysRoleService.editRoleRule(roleRuleEdit);
    }
}
